home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 October: Mac OS SDK / Dev.CD Oct 96 SDK / Dev.CD Oct 96 SDK1.toast / Development Kits (Disc 1) / Open Transport / Sample Code / DLPI / OT DLPI Sample1.0B7 / Common Source / PCIRoutines.h < prev    next >
Encoding:
Text File  |  1995-04-17  |  1.9 KB  |  57 lines  |  [TEXT/MPS ]

  1. /*
  2.     File:        PCIRoutines.h
  3.  
  4.     Contains:    This file contains items related to the PCI Bus.
  5.     
  6.     Written by:    
  7.  
  8.     Copyright:    © 1994 by Apple Computer, Inc., all rights reserved.
  9.  
  10.     Change History (most recent first):
  11.  
  12.  
  13.     To Do:
  14. */
  15.  
  16.  
  17. //-----------------------------------------------------------------------------------------
  18. // These offsets are used by the GetPCICardBaseAddress() to obtain base addresses
  19. //-----------------------------------------------------------------------------------------
  20. #define kPCIConfigBase10Offset                0x10
  21. #define kPCIConfigBase14Offset                0x14
  22. #define kPCIConfigBase18Offset                0x18
  23. #define kPCIConfigBase1COffset                0x1C
  24. #define kPCIConfigBase20Offset                0x20
  25. #define kPCIConfigBase24Offset                0x24
  26. #define kPCIConfigBaseROM30Offset            0x30
  27.  
  28.  
  29.  
  30. //-----------------------------------------------------------------------------------------
  31. // PCI Configuration Register Definitions
  32. //    Register Bit Definitions also
  33. //-----------------------------------------------------------------------------------------
  34.  
  35. #define kPCIConfigVendorIDRegister            (LogicalAddress )0x00000000
  36. #define kPCIConfigDeviceIDRegister            (LogicalAddress )0x00000002
  37. #define kPCIConfigCommandRegister            (LogicalAddress )0x00000004
  38. #define            kIOSpaceEnableBit        0x0001
  39. #define            kMemorySpaceEnableBit    0x0002
  40. #define            kBusMasterEnableBit        0x0004
  41. #define kPCIConfigStatusRegister            (LogicalAddress )0x00000006
  42.  
  43.  
  44.  
  45.  
  46. //-----------------------------------------------------------------------------------------
  47. // Function Prototypes
  48. //-----------------------------------------------------------------------------------------
  49.  
  50. OSStatus GetPCICardBaseAddress(RegEntryID *theID, UInt32 *baseRegAddress, UInt8 offsetValue,UInt32 *spaceAllocation);
  51. OSStatus UninstallISR(void);
  52. OSStatus InstallISR(void);
  53. OSStatus GetAProperty(RegEntryID *theID, RegPropertyName *prop,RegPropertyValue *val,RegPropertyValueSize *siz);
  54. void DisposeProperty(RegPropertyValue *val);
  55.  
  56.  
  57.